
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tishi"></use>
                    </svg>
                    <div class="name">提示</div>
                    <div class="fontclass">#icon-tishi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jia"></use>
                    </svg>
                    <div class="name">加</div>
                    <div class="fontclass">#icon-jia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontxinjian"></use>
                    </svg>
                    <div class="name">新建</div>
                    <div class="fontclass">#icon-iconfontxinjian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontdaoru"></use>
                    </svg>
                    <div class="name">导入</div>
                    <div class="fontclass">#icon-iconfontdaoru</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daochu"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-daochu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qq"></use>
                    </svg>
                    <div class="name">qq</div>
                    <div class="fontclass">#icon-qq</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daima"></use>
                    </svg>
                    <div class="name">代码</div>
                    <div class="fontclass">#icon-daima</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wenjianliebiao"></use>
                    </svg>
                    <div class="name">文件列表</div>
                    <div class="fontclass">#icon-wenjianliebiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shanchu"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">#icon-shanchu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-github"></use>
                    </svg>
                    <div class="name">github</div>
                    <div class="fontclass">#icon-github</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin"></use>
                    </svg>
                    <div class="name">微信</div>
                    <div class="fontclass">#icon-weixin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouji"></use>
                    </svg>
                    <div class="name">手机</div>
                    <div class="fontclass">#icon-shouji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mulu"></use>
                    </svg>
                    <div class="name">目录</div>
                    <div class="fontclass">#icon-mulu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontlink"></use>
                    </svg>
                    <div class="name">链接</div>
                    <div class="fontclass">#icon-iconfontlink</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-html"></use>
                    </svg>
                    <div class="name">ab-html-c</div>
                    <div class="fontclass">#icon-html</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-exclam-9"></use>
                    </svg>
                    <div class="name">叹号</div>
                    <div class="fontclass">#icon-exclam-9</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-baocun"></use>
                    </svg>
                    <div class="name">保存</div>
                    <div class="fontclass">#icon-baocun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daochu1"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-daochu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tuitetwitter43"></use>
                    </svg>
                    <div class="name">推特_twitter43</div>
                    <div class="fontclass">#icon-tuitetwitter43</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-asmkticon0226"></use>
                    </svg>
                    <div class="name">右</div>
                    <div class="fontclass">#icon-asmkticon0226</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-menudown"></use>
                    </svg>
                    <div class="name">menu_down</div>
                    <div class="fontclass">#icon-menudown</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-menuup"></use>
                    </svg>
                    <div class="name">menu_up</div>
                    <div class="fontclass">#icon-menuup</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-save"></use>
                    </svg>
                    <div class="name">保存</div>
                    <div class="fontclass">#icon-save</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-numpickerminus"></use>
                    </svg>
                    <div class="name">numpicker_minus</div>
                    <div class="fontclass">#icon-numpickerminus</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-numpickerplus"></use>
                    </svg>
                    <div class="name">numpicker_plus</div>
                    <div class="fontclass">#icon-numpickerplus</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhankai"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">#icon-zhankai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youxiang"></use>
                    </svg>
                    <div class="name">邮箱</div>
                    <div class="fontclass">#icon-youxiang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-biaoti"></use>
                    </svg>
                    <div class="name">标题</div>
                    <div class="fontclass">#icon-biaoti</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daoru-copy"></use>
                    </svg>
                    <div class="name">导入</div>
                    <div class="fontclass">#icon-daoru-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dakai"></use>
                    </svg>
                    <div class="name">打开</div>
                    <div class="fontclass">#icon-dakai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jian-copy"></use>
                    </svg>
                    <div class="name">减</div>
                    <div class="fontclass">#icon-jian-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouqi"></use>
                    </svg>
                    <div class="name">收起</div>
                    <div class="fontclass">#icon-shouqi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhankai1"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">#icon-zhankai1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daochu2"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-daochu2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weibiaoti--"></use>
                    </svg>
                    <div class="name">修改</div>
                    <div class="fontclass">#icon-weibiaoti--</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-Facebook"></use>
                    </svg>
                    <div class="name">Facebook</div>
                    <div class="fontclass">#icon-Facebook</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daoru"></use>
                    </svg>
                    <div class="name">导入</div>
                    <div class="fontclass">#icon-daoru</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-articleUser"></use>
                    </svg>
                    <div class="name">作者</div>
                    <div class="fontclass">#icon-articleUser</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-export"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-export</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yinyong"></use>
                    </svg>
                    <div class="name">引用</div>
                    <div class="fontclass">#icon-yinyong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dakai1"></use>
                    </svg>
                    <div class="name">打开</div>
                    <div class="fontclass">#icon-dakai1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web__yirenzheng"></use>
                    </svg>
                    <div class="name">web__已认证</div>
                    <div class="fontclass">#icon-web__yirenzheng</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web__xiala_you"></use>
                    </svg>
                    <div class="name">web__下拉_右</div>
                    <div class="fontclass">#icon-web__xiala_you</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web__xiala_zuo"></use>
                    </svg>
                    <div class="name">web__下拉_左</div>
                    <div class="fontclass">#icon-web__xiala_zuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web__xiala_shang"></use>
                    </svg>
                    <div class="name">web__下拉_上</div>
                    <div class="fontclass">#icon-web__xiala_shang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web__xiala"></use>
                    </svg>
                    <div class="name">web__下拉</div>
                    <div class="fontclass">#icon-web__xiala</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web_shouhui"></use>
                    </svg>
                    <div class="name">web_收回</div>
                    <div class="fontclass">#icon-web_shouhui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-web_xiangxiazhankai"></use>
                    </svg>
                    <div class="name">web_向下展开</div>
                    <div class="fontclass">#icon-web_xiangxiazhankai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daochu3"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-daochu3</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
